﻿<phone:PhoneApplicationPage
    x:Class="KhanViewer.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--Data context is set to sample data above and LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <Image Margin="-30,105,-62,-28" Source="/watermark.png" Stretch="Fill" Grid.Row="1" Opacity="0.135"/>

        <!--TitlePanel contains the name of the application and page title-->

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,0,0,10">
            <TextBlock x:Name="PageTitle" Text="Khan Academy" Margin="5,-15,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontFamily="Segoe WP Black" FontSize="64"/>
        </StackPanel>

        <!--ContentPanel contains ListBox and ListBox ItemTemplate. Place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,15,12,0">
            <ListBox x:Name="MainListBox" Margin="0,0,-12,0" ItemsSource="{Binding Categories}" SelectionChanged="MainListBox_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                    	<StackPanel Orientation="Horizontal">
	                      <StackPanel Margin="0,0,0,25" Width="432">
	                      	<TextBlock Text="{Binding Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle2Style}" FontFamily="Segoe WP Semibold" FontSize="26.667" Margin="25,0,12,0"/>
	                      	<TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="35,-2,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
	                      </StackPanel>
	                      <Rectangle Height="22" StrokeEndLineCap="Round" Stroke="Black" StrokeThickness="2" Width="36" CacheMode="BitmapCache" RadiusX="5" RadiusY="5" Margin="-15,20,0,0" RenderTransformOrigin="0.472,0" VerticalAlignment="Top">
	                      	<Rectangle.Projection>
	                      		<PlaneProjection LocalOffsetY="-11"/>
	                      	</Rectangle.Projection>
	                      	<Rectangle.Fill>
	                      		<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
	                      	</Rectangle.Fill>
	                      </Rectangle>
						</StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        <Rectangle Height="9" Margin="91,0,0,0" Stroke="Black" VerticalAlignment="Bottom" StrokeEndLineCap="Round" StrokeThickness="2">
        	<Rectangle.Fill>
        		<SolidColorBrush Color="{StaticResource PhoneAccentColor}"/>
        	</Rectangle.Fill>
        </Rectangle>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>